package jp.co.sn.mml.pojo.tmtork;

import jp.co.sn.mml.pojo.tmsst.Tmsst;

public class TmtorkId implements java.io.Serializable { 

	//コード区分
	private String cdKbn;
	//コード
	private Tmsst code;
	//取決区分
	private String tkKbn;
	//表示区分
	private String hjKbn;
	//取決コード
	private String tkCd;

	/** default constructor */
	public TmtorkId(){

	}

	/** full constructor */
	public TmtorkId(String cdKbn,Tmsst code,String tkKbn
			,String hjKbn,String tkCd){
		this.cdKbn = cdKbn;
		this.code = code;
		this.tkKbn = tkKbn;
		this.hjKbn = hjKbn;
		this.tkCd = tkCd;
	}

	//Property accessors
	public String getCdKbn(){
		return this.cdKbn;
	}

	public void setCdKbn(String cdKbn){
		this.cdKbn=cdKbn;
	}

	public Tmsst getCode(){
		return this.code;
	}

	public void setCode(Tmsst code){
		this.code=code;
	}

	public String getTkKbn(){
		return this.tkKbn;
	}

	public void setTkKbn(String tkKbn){
		this.tkKbn=tkKbn;
	}

	public String getHjKbn(){
		return this.hjKbn;
	}

	public void setHjKbn(String hjKbn){
		this.hjKbn=hjKbn;
	}

	public String getTkCd(){
		return this.tkCd;
	}

	public void setTkCd(String tkCd){
		this.tkCd=tkCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmtorkId))
			return false;

		TmtorkId castOther = (TmtorkId) other;

		return ((this.getCdKbn() ==  castOther.getCdKbn())
				||(this.getCdKbn()!=null && castOther.getCdKbn() !=null 
					&& castOther.getCdKbn() !=null 
					&& this.getCdKbn().equals(castOther.getCdKbn())))
			&& ((this.getCode() ==  castOther.getCode())
				||(this.getCode()!=null && castOther.getCode() !=null 
					&& castOther.getCode() !=null 
					&& this.getCode().equals(castOther.getCode())))
			&& ((this.getTkKbn() ==  castOther.getTkKbn())
				||(this.getTkKbn()!=null && castOther.getTkKbn() !=null 
					&& castOther.getTkKbn() !=null 
					&& this.getTkKbn().equals(castOther.getTkKbn())))
			&& ((this.getHjKbn() ==  castOther.getHjKbn())
				||(this.getHjKbn()!=null && castOther.getHjKbn() !=null 
					&& castOther.getHjKbn() !=null 
					&& this.getHjKbn().equals(castOther.getHjKbn())))
			&& ((this.getTkCd() ==  castOther.getTkCd())
				||(this.getTkCd()!=null && castOther.getTkCd() !=null 
					&& castOther.getTkCd() !=null 
					&& this.getTkCd().equals(castOther.getTkCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCdKbn() == null ? 0 : this.getCdKbn().hashCode());
		result = 37 * result
				+ (getCode() == null ? 0 : this.getCode().hashCode());
		result = 37 * result
				+ (getTkKbn() == null ? 0 : this.getTkKbn().hashCode());
		result = 37 * result
				+ (getHjKbn() == null ? 0 : this.getHjKbn().hashCode());
		result = 37 * result
				+ (getTkCd() == null ? 0 : this.getTkCd().hashCode());
		return result;
	}

}